Systems and methods for processing motion sensor generated data

ABSTRACT

Systems and methods for processing data from a motion sensor to detect intentional movements of a device are provided. An electronic device having a motion sensor may process motion sensor data along one or more dimensions to generate an acceleration value representative of the movement of the electronic device. The electronic device may then determine whether the acceleration value changes from less than a low threshold, to more than a high threshold, and again to less than the low threshold within a particular amount of time, reflecting an intentional movement of the electronic device by the user. In response to determining that the acceleration value is associated with an intentional movement of the electronic device, the electronic device may perform a particular event or operation. For example, in response to detecting that an electronic device has been shaken, the electronic device may shuffle a media playlist.

BACKGROUND OF THE INVENTION

Electronic devices, and in particular portable media devices may includeseveral input mechanisms for users to access or control device functionsor operations. For example, some electronic devices may include keys orbuttons that a user may press to provide an input (e.g., keys from akeyboard, or a selection button). As another example, some electronicdevices may include touch-sensitive surfaces operative to detect inputsprovided by a user (e.g., a capacitive touch screen or touch pad, or apressure pad).

In some embodiments, electronic devices may include one or more sensorsfor detecting characteristics of the electronic device or of thesurroundings of the electronic device. For example, an electronic devicemay include a GPS or other location detection sensor operative to detectthe location of the electronic device. As another example, an electronicdevice may include an accelerometer, gyroscope, or other motion sensoror motion sensing component operative to detect the orientation of theelectronic device. The electronic device may be operative toautomatically perform particular operations based on sensor outputsreflecting the position or orientation of the device (e.g., switch adisplay to portrait or landscape mode, or provide an indication ofresources available in the vicinity of the user).

SUMMARY OF THE INVENTION

System, methods and computer-readable media for detecting intentionalmovements of an electronic device and associating an electronic deviceevent with a detected movement are provided.

In some embodiments, the electronic device may identify the output of amotion sensor of the device and process the output to generate anacceleration value. The electronic device may track the variations ofthe acceleration value over time and determine, by tracking, whether theacceleration value sequentially changes from less than a predefined lowthreshold, to more than a predefined high threshold, and again to lessthan the low threshold. In some embodiments, one or more timingconstraints may be applied to the variations of the acceleration value.For example, the acceleration value may be more than the high thresholdfor a minimum time, and change from more than the high threshold to lessthan the low threshold in less than a maximum time. As another example,the change in value from less than the low threshold to more than thehigh threshold and back to less than the low threshold may be less thana master time.

In some embodiments, the electronic device may detect a motion of anelectronic device from the output of a motion sensor and process theoutput to generate an acceleration value associated with the operation.In response to determining that the acceleration value becomes less thana predefined low threshold, more than a predefined high threshold, andagain less than the low threshold, the electronic device may perform aparticular operation associated with the detected motion. In someembodiments, the electronic device may associate at least one of theprocess for determining the acceleration value and the values of eachthreshold to different electronic device operations associated withelectronic device movements. The process and threshold values selectedmay be associated with particular distinguishable electronic devicemovements to ensure that the proper electronic device operation isperformed in response to detecting a device motion.

In some embodiments, a motion sensor of an electronic device may providean output related to the motion of the device. A processor of theelectronic device may process the motion sensor output and determinewhether the motion sensor output satisfies a rule associated withintentional movements of the electronic device. If the processordetermines that the rule is satisfied, the processor may generate anevent. The rule may include, for example, determining that anacceleration value determined from the motion sensor output is higher orlower than particular threshold, and moves to different values withinparticular time constraints.

BRIEF DESCRIPTION OF THE DRAWINGS

The various embodiments of the invention are set forth in the followingdetailed description, taken in conjunction with the accompanyingdrawings, in which like reference characters refer to like partsthroughout, and in which:

FIG. 1 is a schematic view of an illustrative electronic device fordetecting user inputs using a motion sensor in accordance with oneembodiment of the invention;

FIG. 2 is a schematic view of an illustrative accelerometer inaccordance with one embodiment of the invention;

FIG. 3 is a schematic view of an illustrative graph of accelerometeroutput over time in accordance with one embodiment of the invention;

FIG. 4 is a schematic view of an illustrative graph of the magnitude ofthe acceleration in accordance with one embodiment of the invention;

FIG. 5 is a schematic view of an illustrative graph of the magnitude ofacceleration after eliminating the effect of gravity in accordance withone embodiment of the invention;

FIG. 6 is a schematic view of an illustrative graph of the rectifiedmagnitude of acceleration after eliminating the effect of gravity inaccordance with one embodiment of the invention;

FIG. 7 is a schematic view of an illustrative graph depicting anaccelerometer output exceeding a threshold in accordance with oneembodiment of the invention;

FIG. 8 is a schematic view of an illustrative graph depicting anaccelerometer output associated with an intentional movement of anelectronic device in accordance with one embodiment of the invention;and

FIG. 9 is a schematic state diagram of illustrative states of anelectronic device detecting an acceleration value in accordance with oneembodiment of the invention.

DETAILED DESCRIPTION

An electronic device having a motion sensor is provided. The motionsensor may include, for example, an accelerometer operative to detectmovements of the electronic device in two or three dimensions.

To enhance a user's experience using the electronic device, theelectronic device may enable the user to control particular operationsor generate specific events by moving the electronic device. Forexample, a user may control media playback operations (e.g., shufflingmedia) by moving the electronic device. The electronic device maydistinguish arbitrary movements of the device from intentional movementsby a user intending to generate an event or perform an operation usingthe output of the motion sensor. To reduce false positives, by which theelectronic device mistakenly believes that a particular movement of thedevice was intended by the user to perform an operative when in fact themovement was arbitrary, the electronic device may process the output ofthe motion sensor.

The motion sensor may provide several outputs (e.g., at least one outputper axis or dimension detected by the sensor). The electronic device mayprocess the outputs to generate a single output (e.g., an accelerationvalue) representative of the electronic device motion. For example, theelectronic device may calculate the magnitude of the sensor output(e.g., the length of a detected acceleration vector). To remove theeffects of gravity from the single output, the electronic device mayapply a high pass filter to remove the DC component of the output. Theresulting AC component may be rectified and filtered using a low passfilter to provide a moving average of the acceleration detected by thedevice. The resulting processed acceleration value may provide asubstantially smooth reflection of the amount of movement of theelectronic device.

The electronic device may determine whether the processed accelerationvalue is associated with an intentional device movement using anysuitable approach. In some embodiments, the electronic device maydetermine whether the acceleration value, starting under a lowthreshold, rises above a high threshold before falling back below thelow threshold. To further reduce false positives, the electronic devicemay determine whether the change in acceleration value occurs within oneor more time periods. For example, the electronic device may determinewhether different variations of the processed acceleration value occurwithin different time constraints (e.g., the entire variation occurswithin a timeout period, or the acceleration value exceeds the highthreshold for a particular duration). In some embodiments, thevariations of the acceleration value may be associated with differentstates of the electronic device such that the device must sequentiallypass through particular states to generate an event or perform anoperation based on data received from the motion sensor.

FIG. 1 is a schematic view of an illustrative electronic device fordetecting user inputs using a motion sensor in accordance with oneembodiment of the invention. Electronic device 100 may include processor102, storage 104, memory 106, input/output circuitry 108, and motionsensor 110. In some embodiments, one or more of electronic devicecomponents 100 may be combined or omitted (e.g., combine storage 104 andmemory 106). In some embodiments, electronic device 100 may includeother components not combined or included in those shown in FIG. 1(e.g., communications circuitry, a power supply, a display, bus, orinput mechanism), or several instances of the components shown inFIG. 1. For the sake of simplicity, only one of each of the componentsis shown in FIG. 1.

Processor 102 may include any processing circuitry operative to controlthe operations and performance of electronic device 100. For example,processor 100 may be used to run operating system applications, firmwareapplications, media playback applications, media editing applications,or any other application. In some embodiments, a processor may drive adisplay and process inputs received from a user interface.

Storage 104 may include, for example, one or more storage mediumsincluding a hard-drive, solid state drive, flash memory, permanentmemory such as ROM, any other suitable type of storage component, or anycombination thereof. Storage 104 may store, for example, media data(e.g., music and video files), application data (e.g., for implementingfunctions on device 100), firmware, user preference information data(e.g., media playback preferences), authentication information (e.g.libraries of data associated with authorized users), lifestyleinformation data (e.g., food preferences), exercise information data(e.g., information obtained by exercise monitoring equipment),transaction information data (e.g., information such as credit cardinformation), wireless connection information data (e.g., informationthat may enable electronic device 100 to establish a wirelessconnection), subscription information data (e.g., information that keepstrack of podcasts or television shows or other media a user subscribesto), contact information data (e.g., telephone numbers and emailaddresses), calendar information data, and any other suitable data orany combination thereof.

Memory 106 can include cache memory, semi-permanent memory such as RAM,and/or one or more different types of memory used for temporarilystoring data. In some embodiments, memory 106 can also be used forstoring data used to operate electronic device applications, or anyother type of data that may be stored in storage 104. In someembodiments, memory 106 and storage 104 may be combined as a singlestorage medium.

Input/output circuitry 108 may be operative to convert (andencode/decode, if necessary) analog signals and other signals intodigital data. In some embodiments, input/output circuitry 108 can alsoconvert digital data into any other type of signal, and vice-versa. Forexample, input/output circuitry 108 may receive and convert physicalcontact inputs (e.g., from a multi-touch screen), physical movements(e.g., from a mouse or sensor), analog audio signals (e.g., from amicrophone), or any other input. The digital data can be provided to andreceived from processor 102, storage 104, memory 106, or any othercomponent of electronic device 100. Although input/output circuitry 108is illustrated in FIG. 1 as a single component of electronic device 100,several instances of input/output circuitry can be included inelectronic device 100.

Electronic device 100 may include any suitable mechanism or componentfor allowing a user to provide inputs to input/output circuitry 108. Forexample, electronic device 100 may include any suitable input mechanism,such as for example, a button, keypad, dial, a click wheel, or a touchscreen. In some embodiments, electronic device 100 may include acapacitive sensing mechanism, or a multi-touch capacitive sensingmechanism. Some sensing mechanisms are described in commonly ownedHotelling et al. U.S. Published Patent Application No. 2006/0026521,filed Jul. 30, 2004, entitled “Gestures for Touch Sensitive InputDevice,” and Hotelling et al. U.S. Published Patent Application No.2006/0026535, filed Jan. 18, 2005, entitled “Mode-Based Graphical UserInterfaces for Touch Sensitive Input Device,” both of which areincorporated herein in their entirety.

In some embodiments, electronic device 100 can include specializedoutput circuitry associated with output devices such as, for example,one or more audio outputs. The audio output may include one or morespeakers (e.g., mono or stereo speakers) built into electronic device100, or an audio component that is remotely coupled to electronic device100 (e.g., a headset, headphones or earbuds that may be coupled tocommunications device with a wire or wirelessly).

In some embodiments, I/O circuitry 108 may include display circuitry(e.g., a screen or projection system) for providing a display visible tothe user. For example, the display circuitry may include a screen (e.g.,an LCD screen) that is incorporated in electronics device 100. Asanother example, the display circuitry may include a movable display ora projecting system for providing a display of content on a surfaceremote from electronic device 100 (e.g., a video projector). In someembodiments, the display circuitry can include a coder/decoder (Codec)to convert digital media data into analog signals. For example, thedisplay circuitry (or other appropriate circuitry within electronicdevice 100) may include video Codecs, audio Codecs, or any othersuitable type of Codec.

The display circuitry also can include display driver circuitry,circuitry for driving display drivers, or both. The display circuitrymay be operative to display content (e.g., media playback information,application screens for applications implemented on the electronicdevice, information regarding ongoing communications operations,information regarding incoming communications requests, or deviceoperation screens) under the direction of processor 102.

Motion sensor 110 may include any suitable motion sensor operative todetect movements of electronic device 100. For example, motion sensor110 may be operative to detect a user's movements of electronic device100. In some embodiments, motion sensor 110 may include one or morethree-axes acceleration motion sensors (e.g., an accelerometer)operative to detect linear acceleration in three directions (i.e., the xor left/right direction, the y or up/down direction, and the z orforward/backward direction). As another example, motion sensor 110 mayinclude one or more two-axis acceleration motion sensors which may beoperative to detect linear acceleration only along each of x orleft/right and y or up/down directions (or any other pair ofdirections). In some embodiments, motion sensor 110 may include anelectrostatic capacitance (capacitance-coupling) accelerometer that isbased on silicon micro-machined MEMS (Micro Electro Mechanical Systems)technology, a piezoelectric type accelerometer, a piezoresistance typeaccelerometer, or any other suitable accelerometer.

In some embodiments, motion sensor 110 may be operative to directlydetect rotation, rotational movement, angular displacement, tilt,position, orientation, motion along a non-linear (e.g., arcuate) path,or any other non-linear motions. For example, if motion sensor 110 is alinear motion sensor, additional processing may be used to indirectlydetect some or all of the non-linear motions. For example, by comparingthe linear output of motion sensor 110 with a gravity vector (i.e., astatic acceleration), motion sensor 110 may be operative to calculatethe tilt of electronic device 100 with respect to the y-axis. In someembodiments, motion sensor 110 may instead or in addition include one ormore gyro-motion sensors or gyroscopes for detecting rotationalmovement. For example, motion sensor 110 may include a rotating orvibrating element.

In some embodiments, the electronic device may include communicationscircuitry for communicating with other devices or with one or moreservers using any suitable communications protocol. Electronic device100 may include one more instances of communications circuitry forsimultaneously performing several communications operations usingdifferent communications networks. For example, communications circuitrymay support Wi-Fi (e.g., a 802.11 protocol), Ethernet, Bluetooth™ (whichis a trademark owned by Bluetooth Sig, Inc.), radio frequency systems,cellular networks (e.g., GSM, AMPS, GPRS, CDMA, EV-DO, EDGE, 3GSM, DECT,IS-136/TDMA, iDen, LTE or any other suitable cellular network orprotocol), infrared, TCP/IP (e.g., any of the protocols used in each ofthe TCP/IP layers), HTTP, BitTorrent, FTP, RTP, RTSP, SSH, Voice over IP(VOIP), any other communications protocol, or any combination thereof.

In some embodiments, electronic device 100 may include a bus operativeto provide a data transfer path for transferring data to, from, orbetween control processor 102, storage 104, memory 106, input/outputcircuitry 108, sensor 110, and any other component included in theelectronic device.

To enhance a user's experience interacting with the electronic device,the electronic device may provide the user with an opportunity toprovide inputs by moving (e.g., shaking) the electronic device. Inparticular, the electronic device may detect inputs provided by a usermoving the electronic device based on the output of the motion sensor ofthe device. For example, the motion sensor may provide an outputassociated with particular movement of the device and cause theelectronic device to perform an operation or generate an event inresponse to detecting the motion sensor output. The detected movementmay include, for example, movement along one or more particular axes ofthe motion sensor (e.g., a tilting motion detected in a z-y plane, or ashaking motion detected by along any of the accelerometer axes).

The electronic device may perform any suitable operation or generate anysuitable event in response to detecting a particular motion. Forexample, in response to detecting a shaking motion, the electronicdevice may shuffle a media playlist, skip to a previous or next mediaitem (e.g., music), change the volume of played back media, pause orplay media, change a playlist attribute (e.g., toggle a shuffle orlooping feature, for example on and off), or perform any other suitableoperation. In some embodiments, the electronic device may allow a userto navigate menus or access functions contextually based on currentlydisplayed menus in response to detecting particular movement of thedevice. For example, the electronic device may display a “Now Playing”display, navigate a cover flow display (e.g., display a next ordifferent album cover), scroll through options, pan or scan to a radiostation (e.g., move across preset radio stations when in a radio mode),or display a next media item (e.g., scroll through images in response todetecting a tilt motion) in response to detecting a particular movementof the device. In some embodiments, the electronic device may perform aparticular operation independent of the current mode or menu of theelectronic device. For example, a media player may always shuffle aplaylist in response to detecting a particular movement of the deviceindependent of the application or mode in use when the movement isdetected (e.g., shuffle a playlist in a media playback mode, in aworkout mode, and in a clock mode). In some embodiments, the user mayselect particular electronic device motions (e.g., from a known library)to associate different motions with different electronic deviceoperations.

An electronic device, and in particular a portable electronic device, isinherently a device that will move as it is used. For example, a usermay carry a portable media player as the user works out or runs, duringwhich the media player will follow the user's movements. As anotherexample, a user may carry a portable media player in a pocket or bag,which may cause the media player to move (e.g., as the user or bagmoves). The motion sensor may be operative to detect all of theseinherent or unintentional electronic device movements, as well asintentional movements by a user intending to cause the electronic deviceto perform an operation associated with a movement (e.g., the usershaking the device to shuffle a playlist). The electronic device musttherefore have the capability of distinguishing between inherentmovements of the electronic device (e.g., the device moves because theuser is running with the device) and intentional movements associatedwith directing the electronic device to perform a particular operation.

The electronic device may use any suitable approach or algorithm fordistinguishing intentional movements of the device from false positives(e.g., movements of the device not to be associated with an electronicdevice operation). Although the following discussion will describesensing motion in the context of a three axis accelerometer, it will beunderstood that the discussion may be applied to any suitable sensingmechanism or combination of sensing mechanisms. FIG. 2 is a schematicview of an illustrative accelerometer in accordance with one embodimentof the invention. Accelerometer 200 may include a microelectro-mechanical system (MEMS) having inertial mass 210, thedeflections of which may be measured (e.g., using analog or digitalcircuitry). For example, mass 210 may be coupled to springs 212 and 213along x-axis 202, springs 214 and 215 along y-axis 204, and springs 216and 217 along z-axis 206. As mass 210 is displaced along any of axes202, 204 and 206, the corresponding springs may deflect and providesignals associated with the deflection to the electronic device. Theelectronic device may identify deflection signals associated with springtension, spring compression, or both. Accelerometer 200 may have anysuitable rest value (e.g., no deflection on any axis), including forexample in free fall (e.g., when the only force on the accelerometer andthe device is gravity).

The electronic device may sample the accelerometer output (e.g.,deflection values of mass 210) at any suitable rate. For example, theelectronic device may sample accelerometer outputs in a range of 5 ms to20 ms, such as 10 ms. The acceleration values detected by theaccelerometer along each axis and output to the electronic device may bestored over a particular time period, and for example plotted over time.FIG. 3 is a schematic view of an illustrative graph of accelerometeroutput over time in accordance with one embodiment of the invention.Graph 300 may include time axis 302 and accelerometer value 304. Theaccelerometer value may be measured using any suitable approach,including for example as a voltage, force per time squared unit, or anyother suitable unit. In some embodiments, the accelerometer may assignnumerical values to the output based on the number of bits associatedwith the accelerometer for each axis. Graph 300 may include curve 312depicting accelerometer measurements along the x-axis (e.g., x-axis 202,FIG. 2), curve 314 depicting accelerometer measurements along the x-axis(e.g., y-axis 204, FIG. 2), and curve 316 depicting accelerometermeasurements along the x-axis (e.g., z-axis 206, FIG. 2)

Because a user may not always move an electronic device in the samemanner (e.g., along the same axes), the electronic device may define,for each sampled time, an accelerometer value that is associated withone or more of the detected accelerometer value along each axis. Forexample, the electronic device may select the highest of the threeaccelerometer outputs for each sampled time. As another example, theelectronic device may determine the magnitude of the detectedacceleration along two or more axes. In particular, the electronicdevice may calculate the square root of the sum of the squares of theaccelerometer outputs (e.g., square root of x²+y²+z²). In someembodiments, the electronic device may ignore accelerometer outputs fora particular axis to reduce false positives (e.g., ignore accelerometeroutput along the z-axis to ignore the device rocking) when a conditionis satisfied (e.g., all the time, or when the accelerometer outputexceeds or fails to exceed a threshold). In some embodiments, theelectronic device may use several approaches to define severalacceleration values associated with different types of movement (e.g.,an acceleration value associated with shaking, a different accelerationvalue associated with spinning, and still another acceleration valueassociated with tilting). The electronic device may then determinewhether one or more of the defined acceleration values satisfiesconditions for determining that the electronic device movementassociated with the defined acceleration values was intended by theuser.

The resulting magnitude of the accelerometer output may be stored by theelectronic device, and for exampled plotted over time. FIG. 4 is aschematic view of an illustrative graph of the magnitude of theacceleration in accordance with one embodiment of the invention. Graph400 may include time axis 402 and acceleration value 404. Whensubstantially no acceleration is detected (e.g., when curve 410 issubstantially flat), the magnitude of acceleration may be non-zero, asit may include acceleration due to gravity. This DC component in themagnitude of acceleration signal may prevent the electronic device fromclearly detecting only movements of the electronic device. This may beparticularly true if the value of the DC component is higher than thevalue of peaks in the magnitude of acceleration signal. In such a case,directly applying a simple low pass filter may conceal rather thanreveal the acceleration signals reflecting movement of the electronicdevice.

To remove the effects of gravity (which may be constant) from thedetected magnitude of acceleration signal, the electronic device mayapply a high pass filter to the magnitude of acceleration signal. Theresulting signal may not include a DC component (e.g., because the highpass filter may have zero gain at DC) and more precisely reflect actualmovements of the electronic device. FIG. 5 is a schematic view of anillustrative graph of the magnitude of acceleration after eliminatingthe effect of gravity in accordance with one embodiment of theinvention. Graph 500 may include time axis 502 and acceleration value504. Curve 510 may be substantially centered around a zero value (e.g.,no DC signal reflecting constant gravity) and include positive andnegative peaks. The electronic device may rectify the signal of curve510 to retain only positive acceleration values. For example, theelectronic device may use a full wave rectifier (e.g., to take themodulus of curve 510). FIG. 6 is a schematic view of an illustrativegraph of the rectified magnitude of acceleration after eliminating theeffect of gravity in accordance with one embodiment of the invention.Graph 600 may include time axis 602 and acceleration value 604. Curve610 may reflect the modulus of each value of curve 510 (FIG. 5), andthus be entirely above a zero acceleration value.

The electronic device may then apply a low pass filter to the rectifiedsignal to provide a smoother signal that removes short term oscillationswhile retaining the longer term trend. For example, the electronicdevice may apply a low pass filter that computes a moving average foreach sample point over any suitable sample size (e.g., a 32 point samplemoving average). The resulting signal may be plotted, for example ascurve 620. This signal may reflect how much the electronic device ismoving (e.g., the value of each sample point indicates the amount bywhich the device is moving).

Using the processed accelerometer signal, the electronic device maydetermine whether or not a detected movement of the device is anintentional movement to be associated with an electronic deviceoperation or event. Any suitable approach may be used to distinguishintentional movements of the electronic device from unintentionalmovements. In some embodiments, the electronic device may define athreshold and determine whether the movement, as detected by theaccelerometer, exceeds the defined threshold for at least a minimumduration. FIG. 7 is a schematic view of an illustrative graph depictingan accelerometer output exceeding a threshold in accordance with oneembodiment of the invention. Graph 700 may include time axis 702 andacceleration value axis 704. Curve 710 may represent the processedaccelerometer data (e.g., processed using the approach described abovein connection with FIGS. 3-6).

Curve 710 may include several regions representing different detectedamounts of movement. For example, curve 710 may include region 1 inwhich detected acceleration values are less than threshold 720 andincreasing. Region 1 may represent, for example, the initial detectionof a movement of the electronic device (e.g., as a user begins to shakethe device). Once the acceleration exceeds threshold 720, curve 710 mayenter region 2, which may represent the largest movement of the device.Curve 710 may then enter region 3, in which the detected accelerationdecrease below threshold 720. Region 3 may represent the end of themovement of the electronic device (e.g., as the user stops moving theelectronic device).

To prevent the electronic device from associating all detected movements(e.g., all acceleration values) with an electronic device operation(e.g., to reduce false positives), the electronic device may require adetected movement to exceed threshold 720. In other words, theacceleration signal may be required to enter region 2 before theelectronic device performs an operation. To further reduce falsepositives, the electronic device may require the detected movement toexceed threshold 720 for a minimum time (e.g., minimum time 730). Thismay prevent the electronic device from performing an operation when auser accidentally drops or jolts the electronic device, which may causea rapid entry into and exit from region 2. The minimum time may beselected to remove false positives while ensuring that a user is notrequired to move the electronic device for an excessive amount of time.In particular, the minimum time selected may account for the delay inthe electronic device in processing the accelerometer signals andgenerating a signal that may be compared to the threshold (e.g., theprocessing delay may include approximately 320 ms due to the 32 samplestaken at 10 ms intervals by high pass filter). For example, the selectedminimum time may be in the range of 500 ms to 1000 ms, such as 600 ms(to which 320 ms of processing delay may be added, thus requiringapproximately 920s of motion by the user before the electronic deviceperforms the requested operation).

While the use of a single threshold and minimum time may eliminatenumerous false positives, the electronic device may still registeracceleration values due to unintentional movements that satisfy thethreshold and minimum time conditions. In particular, if a user iswalking, running, or working out while carrying the electronic device(e.g., in a pocket or in an armband), the electronic device may move byamounts sufficient for the accelerometer output to exceed the thresholdvalue for more than the minimum time. A more refined approach or rulemay then be necessary to avoid associating unintentional detectedmovements with an electronic device operation.

FIG. 8 is a schematic view of an illustrative graph depicting anaccelerometer output associated with an intentional movement of anelectronic device in accordance with one embodiment of the invention.Graph 800 may include time axis 802 and acceleration value axis 804.Curve 810 may represent the processed accelerometer data (e.g.,processed using the approach described above in connection with FIGS.3-6). Graph 800 may include several threshold values, including lowthreshold 820 and high threshold 822.

Curve 810 may include several regions representing different states ofthe electronic device. The electronic device may begin in state 1, inwhich the acceleration value is between the values of low threshold 820and high threshold 822. Thresholds 820 and 822 may be defined such thatacceleration values detected between thresholds 820 and 822 (e.g.,acceleration values associated with state 1) are values typicallydetected during normal use of the electronic device. To provide amovement that the electronic device may detect as being intentional andassociated with an electronic device operation, the electronic devicemay access state 2, in which the acceleration value is less than lowthreshold 820. Low threshold 820 may be defined such that a user musthold the electronic device relatively immobile or static before asubsequent higher acceleration value may be associated with anintentional movement of the electronic device. Requiring the electronicdevice to enter state 2 may reduce false positives due to a user movingthe electronic device while performing an activity during which largeacceleration values may be detected (e.g., running).

Once the user has caused the electronic device to enter state 2, theuser may move the electronic device to provide an acceleration valuesufficient to be detected as one to be associated with an electronicdevice operation. When the detected acceleration value increases andexceeds low threshold 822, the electronic device may enter state 3. Asthe electronic device enters state 3, a master timeout 830 may bestarted. If master timeout 830 times out before the electronic devicereaches the acceleration values associated with state 6 (describedbelow), the electronic device may return to state 1 and not perform anoperation associated with the detected electronic device movement. Themaster timeout may be of any suitable length, including in the range of1000 ms to 10000 ms, such as 2000 ms.

As the detected acceleration value increases, it may exceed highthreshold 822, causing the electronic device to enter state 4. Theelectronic device may remain in state 4 until the detected accelerationvalue decreases below high threshold 822, at which time the electronicdevice may enter state 5. As the electronic device enters state 4, atimer may be started. If the detected acceleration value moves belowhigh threshold 822 (e.g., the acceleration value associated with state5) before the timer reaches a minimum value (e.g., minimum time 832),the electronic device may return to state 1 and not perform an operationassociated with the detected electronic device movement (e.g., thedetected acceleration was a single short accidental movement, such asdropping the electronic device). Minimum time 832 may be any suitableduration, including for example a duration in the range of 200 ms to1000 ms, such as 500 ms.

As the electronic device enters state 5, another timer may be started.The electronic device may remain in state 5 until the acceleration valuedecreases below low threshold 820, at which time the electronic devicemay enter state 6. If the detected acceleration value moves below lowthreshold 820 (e.g., the acceleration value associated with state 6)after the timer exceeds a maximum value (e.g., maximum time 834), theelectronic device may return to state 1 and not perform an operationassociated with the detected electronic device movement (e.g., thedetected acceleration is a lasting movement, such as running whilecarrying the electronic device). Maximum time 834 may be any suitableduration, including for example a duration in the range of 200 ms to1000 ms, such as 500 ms. Once the electronic device enters state 6, theelectronic device may perform the requested electronic device operationor event, and return to state 1.

In some embodiments, the values of low threshold 820 and high threshold822 may be adjusted to refine the detection of intentional movements bythe electronic device. For example, a user may select particular valuesfor one or both of the low and high thresholds (e.g., to define thesensitivity of the device). In one implementation, a user may set thethreshold values by dragging a displayed slider or providing an input(e.g., a numerical value). In another implementation, a user may selectan appropriate pre-set threshold value for one or both of the low andhigh thresholds (e.g., select an option for low sensitivity, normalsensitivity, or high sensitivity). In some embodiments, the electronicdevice may automatically adjust threshold values based on a user'shistory of inputs (e.g., the user undid the effect of an operation, orinstructed the electronic device to perform an operation after anintentional electronic device movement was not detected). In someembodiments, the low and high thresholds may be related, for examplenon-linearly or linearly. For example, the high threshold value may be2.5 times the low threshold value (e.g., low threshold equals 0.4 timeshigh threshold).

In some embodiments, several sets of low and high threshold values maybe defined and associated with different electronic device operations orevents. For example, different threshold values may be associated withdifferent types of acceleration values (e.g., defined using differentportions of the motion sensor output or applying different algorithms orprocesses to the motion sensor output), such that different thresholdvalues may be associated with different motions of the electronic device(e.g., different threshold values for shaking, tilting and spinning).The threshold values may have different relations based on theunderlying acceleration value used or operation to perform, includingfor example any suitable non-linear or linear relation. In someembodiment, the user or the electronic device may define highthresholds, low thresholds, or both for different types of accelerationvalues, electronic device operations or generated events.

In some embodiments, one or more of the values of the master timeout,minimum time and maximum time may instead or in addition be adjusted torefine the detection of intentional movements by the electronic device.For example, a user may select particular values for one or more of thetimeout and times (e.g., using a slider, providing an input, orselecting a preset value). As another example, the electronic device mayautomatically adjust threshold values based on a user's history ofinputs. In some embodiments, the low and high thresholds may be relatedor constrained relative each other (e.g., the minimum time cannot exceedthe master timeout).

If the electronic device identifies several types of motions to detectfor performing different electronic device operations, the electronicdevice may sequentially or simultaneously generate differentacceleration values (e.g., using different processes) and applydifferent rules to the acceleration values to determine whether adetected motion sensor output is associated with at least one of theseveral identified intentional motions. In some embodiments, theelectronic device may prioritize the processing of acceleration valuesor application of different rules to determine which operation toperform in response to a detected motion (e.g., define a priorityscheme).

In some embodiments, the electronic device may automatically define oneor more of an acceleration value calculating process, threshold values,and timeout values for particular electronic device motions. Forexample, the electronic device may allow a user to define a particularmotion by moving the device in the particular manner. In response todetecting the motion once or several times, the electronic device mayprocess the motion sensor output to define acceleration value process,thresholds, and timeouts that reflect the user's motion. The user mayfurther be directed to move the electronic device in manners other thanthe particular motion to ensure that other motions are not detected asfalse positives and to refine the definition of the motion. The user maythen associated the newly defined motion with any suitable electronicdevice operation or event generation.

FIG. 9 is a schematic state diagram of illustrative states of anelectronic device detecting an acceleration value in accordance with oneembodiment of the invention. Although some of the edges in the followingstate diagram are associated with particular variables being equal toparticular values, it will be understood that any appropriate edge mayor may not be associated with particular variables being equal toparticular values (e.g., in addition to particular variables beinggreater or smaller than particular values).

State diagram 900 may include state 1, from which the electronic devicemay begin. The detected acceleration value A by the electronic device(e.g., the resulting value following processing of the accelerometeroutputs) may be greater than or equal to a low threshold low-TH (e.g.,low threshold 820, FIG. 8). So long as the detected acceleration valueremains greater than or equal to the low threshold, the electronicdevice may follow edge 902 and remain in state 1.

When the electronic device determines that the detected accelerationvalue is smaller than the low threshold, the electronic device mayfollow edge 904 and move to state 2. The electronic device may remain instate 2 so long as the detected acceleration value remains smaller thanthe low threshold. When the detected acceleration value is greater thanor equal to the low threshold, and lower than or equal to a highthreshold high TH (e.g., high threshold 822, FIG. 8), the electronicdevice may follow edge 906 and move to state 3. The electronic devicemay start a master timer when it enters state 3 (e.g., the electronicdevice may time out at master timeout value T-master). If the electronicdevice determines that it is still in state 3 (e.g., the detectedacceleration value remains in the range between the low and highthresholds) and that the master timer exceeds the master timeout value,the electronic device may follow edge 908 and return to state 1.

Alternatively, if the electronic device determines that the detectedacceleration value has decreased and is less than the low threshold, theelectronic device may follow edge 910 and return to state 2. When theelectronic returns to state 2, the master timer may be reset to await asubsequent return to state 3. Still alternatively, if the electronicdevice determines that the detected acceleration value exceeds the highthreshold and the master timer is less than or equal to the mastertimeout value, the electronic device may follow edge 912 to state 4. Themaster timer started at state 3 may continue to run while the electronicdevice moves to state 4. If the electronic device determines that it isstill in state 4 (e.g., the detected acceleration value greater than thehigh threshold) and that the master timer exceeds the master timeoutvalue, the electronic device may follow edge 914 and return to state 1.

In addition to the ongoing master timer, the electronic device mayinitiate a minimum timer when it enters state 4 (e.g., the electronicdevice may time in at minimum timer value T-min). The minimum timer mayensure that the electronic device remains in state 4 for a sufficientperiod before moving to the next state. If the electronic devicedetermines that the detected acceleration value is less than or equal tothe high threshold (e.g., the detected acceleration value is no longerassociated with state 4), and that the minimum timer is less than theminimum timer value, the electronic device may follow edge 916 andreturn to state 1.

Alternatively, if the electronic device determines that the detectedacceleration value is less than or equal to the high threshold, and themaster timer is less than or equal to the master timer value, and theminimum timer is greater than or equal to the minimum timer value, theelectronic device may follow edge 918 and move to state 5. The mastertimer started at state 3 may continue to run while the electronic devicemoves to state 5. If the electronic device determines that it is stillin state 5 (e.g., the detected acceleration value greater than the lowthreshold) and that the master timer exceeds the master timeout value,the electronic device may follow edge 920 and return to state 1.

In addition to the ongoing master timer, the electronic device mayinitiate a maximum timer when it enters state 5 (e.g., the electronicdevice may time out at maximum timer value T-max). The maximum timer mayensure that the electronic device does not remain state 5 for anexcessive amount of time (e.g., the user of the electronic deviceintentionally moved the device then stopped moving the device) beforemoving to the next state. If the electronic device determines that thedetected acceleration value is greater than the low threshold (e.g., thedetected acceleration value is still associated with state 5), and thatthe maximum timer is greater than the maximum timer value, theelectronic device may follow edge 922 and return to state 1.

Alternatively, if the electronic device determines that the detectedacceleration value is less than or equal to the low threshold, and themaster timer is less than the master timer value, and the maximum timeris less than or equal to the maximum timer value, the electronic devicemay follow edge 924 and move to state 6. At state 6, the electronicdevice may generate an event or perform an operation associated with thedetected acceleration of the electronic device. In some embodiments, theelectronic device may provide feedback to indicate to the user that theevent was generated or the operation was performed. For example, theelectronic device may provide an audio cue to indicate that a playlistwas reshuffled, or a visual transition to indicate that a new radiostation or playlist was selected.

In some embodiments, the monitoring of the motion sensor output andprocessing of the output to generate an motion sensor value may consumesignificant power. In particular, if the electronic device is portableand relies on an internal battery, reducing power consumption may bedesirable. The electronic device may cease monitoring or turn off themotion sensor automatically or in response to a user instruction. Forexample, a user may toggle a switch to turn off the feature of providinginstructions by moving the electronic device. In some embodiments, theelectronic device may automatically turn off the motion sensor based onthe context of the electronic device. For example, if a user activates ahold switch to prevent an input mechanism from receiving inputs, theelectronic device may turn off the motion sensor (e.g., as the user hasindicated that inputs will not be provided). As another example, if anelectronic device enters a sleep or lock mode or darkens a display whileproviding an audio output, the electronic device may turn off the motionsensor (e.g., no inputs are received until the user provides a physicalinput using an input mechanism to exit the sleep or lock mode orreactivate the display).

Thus it is seen that systems and methods for processing signalsgenerated by an accelerometer and generating corresponding events havebeen provided. It will be understood that the foregoing is onlyillustrative of the principles of the invention, and that variousmodifications can be made by those skilled in the art without departingfrom the scope and spirit of the invention, and the present invention islimited only by the claims that follow.

1.-32. (canceled)
 33. A method for detecting an intentional movement ofan electronic device based on a motion sensor output, comprising:identifying the output of the motion sensor; processing the output togenerate a motion value; tracking variations of the motion value overtime; and determining, in response to tracking, that the motion valuesequentially changes from being in a first state relative to first andsecond thresholds to being in a second state relative to the first andsecond thresholds, and then from being in the second state to being in athird state relative to the first and second thresholds, wherein: thefirst threshold is different than the second threshold; and the firststate is different than the second state.
 34. The method of claim 33,wherein determining further comprises determining before a mastertimeout lapses.
 35. The method of claim 34, wherein the master timeoutbegins when the motion value changes from being in the first state tobeing in the second state.
 36. The method of claim 35, whereindetermining further comprises determining that the motion value remainsin the second state for at least a minimum time.
 37. The method of claim36, wherein determining further comprises determining that the motionvalue changes from being in the second state to being in the third statewithin a maximum time.
 38. The method of claim 37, wherein: the firststate is one of greater than both the first threshold and the secondthreshold and less than both the first threshold and the secondthreshold; the second state is between the first threshold and thesecond threshold; and the third state is the other one of greater thanboth the first threshold and the second threshold and less than both thefirst threshold and the second threshold
 39. The method of claim 33,wherein determining further comprises determining that the motion valueremains in the second state for at least a minimum time.
 40. The methodof claim 39, wherein: the first state is one of greater than both thefirst threshold and the second threshold and less than both the firstthreshold and the second threshold; the second state is between thefirst threshold and the second threshold; and the third state is thesame as the first state.
 41. The method of claim 33, further comprisingperforming an electronic device operation in response to determining.42. The method of claim 33, wherein: the first state is one of greaterthan both the first threshold and the second threshold and less thanboth the first threshold and the second threshold; the second state isbetween the first threshold and the second threshold; and the thirdstate is the same as the first state.
 43. The method of claim 33,wherein: the first state is one of greater than both the first thresholdand the second threshold and less than both the first threshold and thesecond threshold; the second state is between the first threshold andthe second threshold; and the third state is the other one of greaterthan both the first threshold and the second threshold and less thanboth the first threshold and the second threshold
 44. The method ofclaim 33, wherein: determining comprises determining, in response totracking, that the motion value sequentially changes from being in thefirst state to being in the second state, and then from being in thesecond state to being in the third state, and then from being in thethird state to being in the second state, and then from being in thesecond state to being in the first state; the first threshold isdifferent than the second threshold; the first state is different thanthe second state; the second state is different than the third state;and the third state is different than the first state.
 45. The method ofclaim 44, wherein determining further comprises determining before amaster timeout lapses.
 46. The method of claim 45, wherein the mastertimeout begins when the motion value changes from being in the firststate to being in the second state.
 47. The method of claim 46, whereindetermining further comprises determining that the motion value remainsin the third state for at least a minimum time.
 48. The method of claim47, wherein determining further comprises determining that the motionvalue changes from being in the second state to being in the first statewithin a maximum time.
 49. The method of claim 48, further comprisingperforming an electronic device operation in response to determining,wherein: the first state is one of greater than both the first thresholdand the second threshold and less than both the first threshold and thesecond threshold; the second state is between the first threshold andthe second threshold; and the third state is the other one of greaterthan both the first threshold and the second threshold and less thanboth the first threshold and the second threshold.
 50. The method ofclaim 43, wherein: the first state is one of greater than both the firstthreshold and the second threshold and less than both the firstthreshold and the second threshold; the second state is between thefirst threshold and the second threshold; and the third state is theother one of greater than both the first threshold and the secondthreshold and less than both the first threshold and the secondthreshold.
 51. An electronic device comprising: a motion sensoroperative to provide an output related to motion of the electronicdevice; and a processor configured to: process the output to generate amotion value; and determine that the motion value satisfies a ruleassociated with intentional movements of the electronic device, wherein:the rule requires that the motion value changes from being in a firststate relative to first and second thresholds to being in a second staterelative to the first and second thresholds, and then changes from beingin the second state to being in a third state relative to the first andsecond thresholds; the first threshold is different than the secondthreshold; and the first state is different than the second state. 52.The electronic device of claim 51, wherein the rule further requiresthat the motion value changes from being in the first state to being inthe second state and then from being in the second state to being in thethird state before the lapse of a master timeout that begins when themotion value changes from being in the first state.
 53. The electronicdevice of claim 51, wherein the rule further requires that the motionvalue remains in the second state for at least a minimum time.
 54. Theelectronic device of claim 51, wherein the rule further requires thatthe motion value changes from being in the second state to being in thethird state within a maximum time.
 55. The electronic device of claim51, wherein: the first state is one of greater than both the firstthreshold and the second threshold and less than both the firstthreshold and the second threshold; the second state is between thefirst threshold and the second threshold; and the third state is thesame as the first state.
 56. The electronic device of claim 51, wherein:the first state is one of greater than both the first threshold and thesecond threshold and less than both the first threshold and the secondthreshold; the second state is between the first threshold and thesecond threshold; and the third state is the other one of greater thanboth the first threshold and the second threshold and less than both thefirst threshold and the second threshold
 57. A non-transitorycomputer-readable medium for detecting an intentional movement of anelectronic device based on a motion sensor output, comprisingcomputer-program logic recorded thereon for: identifying the output ofthe motion sensor; processing the output to generate a motion value;tracking variations of the motion value over time; and determining, inresponse to tracking, that the motion value sequentially changes frombeing in a first state relative to first and second thresholds to beingin a second state relative to the first and second thresholds, and thenfrom being in the second state to being in a third state relative to thefirst and second thresholds, wherein: the first threshold is differentthan the second threshold; and the first state is different than thesecond state.
 58. The non-transitory computer-readable medium of claim57, wherein: the first state is one of greater than both the firstthreshold and the second threshold and less than both the firstthreshold and the second threshold; the second state is between thefirst threshold and the second threshold; and the third state is thesame as the first state.
 59. The non-transitory computer-readable mediumof claim 57, wherein: the first state is one of greater than both thefirst threshold and the second threshold and less than both the firstthreshold and the second threshold; the second state is between thefirst threshold and the second threshold; and the third state is theother one of greater than both the first threshold and the secondthreshold and less than both the first threshold and the secondthreshold.